nested if statements in JavaScript

join shbcf.ru